<%@ page language="java" contentType="text/html; charset=utf-8"%>
<html>
<head>
<%@ include file="/extjs/include/all.jsp"%>
<title>系统信息</title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/extjs/css/file-upload.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/extjs/js/FileUploadField.js"></script>
</head>
<body>
<div id="systeminfoForm" style="width:100%"></div>
<div id="memoryInfoForm" style="width:100%"></div>
</body>
</html>
<script type="text/javascript">

Ext.onReady(function(){
  	var systemInfoStore = new Ext.data.JsonStore({
		url: '${pageContext.request.contextPath}/edu.ccut.saturn.manager.systeminfo.impl::/systemInfoModule/action/GetSystemInfo.action',
		root: 'systeminfolist',
		fields: [
			{name:'key'},
			{name:'value'}
		]
	});   
	systemInfoStore.load();
	
	var resultWidth = Ext.get("systeminfoForm").getWidth();
	var systemInfoModel = new Ext.grid.ColumnModel([ 
	    new Ext.grid.RowNumberer(), 
        {header:'系统环境信息',dataIndex:'key',width:resultWidth*0.5}, 
        {header:'值',dataIndex:'value',width:resultWidth*0.5}
    ]); 
       
	var systemInfoGrid = new Ext.grid.GridPanel({ 
	    el:'systeminfoForm', 
	    title:'系统信息', 
	    autoHeight:true,
	    stripeRows: true,
	    collapsible:true,
	    bodyStyle:'width:100%',
	    trackMouseOver:false, 
	    loadMask: {msg:'正在加载数据，请稍侯……'}, 
	    store:systemInfoStore, 
	    cm: systemInfoModel    
	}); 
	
    systemInfoGrid.render(); 	
   //-----------------------------------------------------------------------------//
   
   
   
  //-----------------------------------------------------------------------------// 
    var memoryInfoStore = new Ext.data.JsonStore({
		url: '${pageContext.request.contextPath}/edu.ccut.saturn.manager.systeminfo.impl::/systemInfoModule/action/GetMemoryInfo.action',
		root: 'memoryInfoList',
		fields: [
			{name:'key'},
			{name:'value'}
		]
	});   
	memoryInfoStore.load();
	
	var resultWidth = Ext.get("systeminfoForm").getWidth();
	var memoryInfoModel = new Ext.grid.ColumnModel([ 
	    new Ext.grid.RowNumberer(), 
        {header:'内存使用情况',dataIndex:'key',width:resultWidth*0.5}, 
        {header:'值',dataIndex:'value',width:resultWidth*0.5}
    ]); 
       
	var memoryInfoGrid = new Ext.grid.GridPanel({ 
	    el:'memoryInfoForm', 
	    title:'系统信息', 
	    autoHeight:true,
	    stripeRows: true,
	    collapsible:true,
	    bodyStyle:'width:100%',
	    trackMouseOver:false, 
	    loadMask: {msg:'正在加载数据，请稍侯……'}, 
	    store:memoryInfoStore, 
	    cm: memoryInfoModel    
	}); 
	
    memoryInfoGrid.render(); 	
    
});
</script>